package es.deusto.ingenieria.is.search.touringproblem.main;

import es.deusto.ingenieria.is.search.algorithms.blind.BreadthFS;
//import es.deusto.ingenieria.is.search.algorithms.blind.BreadthFSwithLog;
import es.deusto.ingenieria.is.search.algorithms.blind.DepthFS;
//import es.deusto.ingenieria.is.search.algorithms.blind.DepthFSwithLog;
import es.deusto.ingenieria.is.search.algorithms.heuristic.BestFS;
//import es.deusto.ingenieria.is.search.algorithms.heuristic.BestFSwithLog;
import es.deusto.ingenieria.is.search.touringproblem.formulation.TouringProblem;
import es.deusto.ingenieria.is.search.touringproblem.formulation.heuristics.VisitingEvaluationFunction;
/**
 * @author irene.gallardo@opendeusto.es y daphne.aberasturi@opendeusto.es
 * clase ejecutable donde se muestra el mapa principal creado
 */

public class MainProgram {

	public static void main(String[] args) {
		try {
			TouringProblem problem = new TouringProblem();			
			problem.addInitialState(problem.gatherInitialPercepts());
			//Muestra por pantalla el estado inicial del entorno cargado
			//System.out.println("Hay un estado inicial correcto asignado al problema:");
			//System.out.println(problem.getInitialStates());
			problem.createOperators();
			
			problem.solve(BreadthFS.getInstance());
			System.out.println("");
			//problem.solve(BreadthFSwithLog.getInstance());
			System.out.println("");
			problem.solve(DepthFS.getInstance());
			System.out.println("");
			//problem.solve(DepthFSwithLog.getInstance());
			System.out.println("");
			problem.solve(new BestFS(new VisitingEvaluationFunction()));
			//problem.solve(new BestFSwithLog(new VisitingEvaluationFunction()));
			
		
		} catch (Exception ex) {
			System.err.println("% [Main Program] Error: " + ex.getMessage());
			ex.printStackTrace();
		}
	}
}
